#include <iostream>
#include <queue>
using namespace std;

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define MaxVertexNum 1000
typedef struct AdjVnode *PtrToAdjVNode;
struct AdjVnode
{
    int AdjV;
    PtrToAdjVNode Next;
};

typedef struct Vnode{
    PtrToAdjVNode Next;
} AdjList[MaxVertexNum];
typedef struct GNode *PtrToGraph;
struct GNode
{
    int Nv;
    int Ne;
    AdjList G;
};
typedef PtrToGraph LGraph;

LGraph CreateGraph(int N);
LGraph Insert(LGraph G, int v1, int v2);
bool V_visit[MaxVertexNum];
int BFS(LGraph G, int vertex_i);
queue<PtrToAdjVNode> clear_queue(queue<PtrToAdjVNode> q);
int main()
{
    int N, M;
    int v1, v2;
    int count;
    float result;
    scanf("%d %d", &N, &M);
    LGraph G;
    G = CreateGraph(N);
    for (int i = 0; i < M;i++)
    {
        scanf("%d %d", &v1, &v2);
        v1 = v1 - 1;
        v2 = v2 - 1;
        G = Insert(G, v1, v2);
    }
    for (int j = 0; j < N;j++)
    {
        V_visit[j] = false;
    }
    for (int i = 0; i < N;i++)
    {
        count = BFS(G, i);
        for (int j = 0; j < N;j++)
        {
            V_visit[j] = false;
        }
        result = 1.0 * count / G->Nv;
        printf("%d: %0.2f%%\n", i+1, result * 100);
    }
    return 0;
}

queue<PtrToAdjVNode> myqueue;
int BFS(LGraph G,int vertex_i)
{
    V_visit[vertex_i] = true;
    int count = 1;//for vertex number less than 6 distance
    int level = 0;
    int last = vertex_i;
    int tail; //tail for next layer

    // Enqueue(V,Q);
    PtrToAdjVNode W;
    W = (PtrToAdjVNode)malloc(sizeof(struct AdjVnode));
    W->AdjV = vertex_i;
    W->Next = G->G[vertex_i].Next;
    myqueue.push(W);



    W = (PtrToAdjVNode)malloc(sizeof(struct AdjVnode));
    while(!myqueue.empty())
    {
        //Dequeue(Q)
        vertex_i = myqueue.front()->AdjV;
        myqueue.pop();
        //循环vertex_i的每个邻接点
        for (W = G->G[vertex_i].Next; W; W = W->Next)
        {
            if(!V_visit[W->AdjV])
            {
                V_visit[W->AdjV] = true;
                myqueue.push(W);
                count++;
                tail = W->AdjV;
            }
        }
        if(vertex_i == last)
        {
            level++;
            last = tail;
        }
        if (level == 6)
            break;
    }
    myqueue = clear_queue(myqueue);
    return count;
}
queue<PtrToAdjVNode> clear_queue(queue<PtrToAdjVNode> q)
{
    queue<PtrToAdjVNode> empty;
    swap(empty, q);
    return q;
}
// int BFS(LGraph G,int vertex_i)
// {
//     int count = 1;//for vertex number less than 6 distance
//     int level = 0;
//     int last, tail; //tail for next layer
//     V_visit[vertex_i] = true;
//     PtrToAdjVNode W;

//     for (W = G->G[vertex_i].Next; W; W = W->Next)
//     {
//         myqueue.push(W);
//         if(W!=NULL)
//             last = W->AdjV;
//     }
        
//     while(!myqueue.empty())
//     {
//         W = myqueue.front();
//         if(W==NULL)
//         {
//             myqueue.pop();
//             continue;
//         }
//         vertex_i = W->AdjV;
//         myqueue.pop();
//         if(!V_visit[vertex_i])
//         {
//             count++;
            
//             for (W = G->G[vertex_i].Next; W; W = W->Next)
//             {
//                 myqueue.push(W);
//                 if(W!=NULL && !V_visit[W->AdjV])
//                     tail = W->AdjV;
//             }
//             V_visit[vertex_i] = true;
//         }
//         if(vertex_i == last)
//         {
//             level++;
//             last = tail;
//         }
//         if (level == 6)
//             break;
//     }
//     return count;
// }
LGraph CreateGraph(int N)
{
    LGraph G;
    G = (LGraph)malloc(sizeof(struct GNode));
    G->Nv = N;
    G->Ne = 0;
    for (int i = 0; i < G->Nv;i++)
        G->G[i].Next = NULL;
    return G;
}
LGraph Insert(LGraph G, int v1, int v2)
{
    PtrToAdjVNode NewNode;
    NewNode = (PtrToAdjVNode)malloc(sizeof(struct Vnode));
    NewNode->AdjV = v2;
    NewNode->Next = G->G[v1].Next;
    G->G[v1].Next = NewNode;


    //无向图还需在v2,v1
    NewNode = (PtrToAdjVNode)malloc(sizeof(struct Vnode));
    NewNode->AdjV = v1;
    NewNode->Next = G->G[v2].Next;
    G->G[v2].Next = NewNode;

    return G;
}